<template>
	<view class="content">
		<lxc_nav :text="this.$t('all.v2')"></lxc_nav>
		<view id="box">
			<view class="language" @click="language('zh')">
				<text>中文</text>
				<image src="../../static/my/xz2.png" mode="" v-if="!lang"></image>
			</view>
			<view class="language" @click="language('en')">
				<text>English</text>
				<image src="../../static/my/xz2.png" mode="" v-if="lang"></image>
			</view>
		</view>

	</view>
</template>

<script>
	import lxc_nav from '../../components/nav.vue'
	export default {
		components: {
			lxc_nav
		},
		data() {
			return {
				lang:true
			}
		},
		onLoad() {
			this.lang=uni.getStorageSync('lang')
			console.log(uni.getStorageSync('lang'));
		},
		methods: {
			language(k){
				if(k=='en'){
					this.lang=true
				}else{
					this.lang=false
				}
				uni.setStorageSync('lang', this.lang);
				console.log(uni.getStorageSync('lang'));
			},
		}
	}
</script>

<style lang="scss" scoped>
	#box {
		position: relative;
		// color: $u-content-color;
		width: 100vw;
		overflow: hidden;
		margin-top: 88rpx;
	}

	.content {
		overflow: hidden;
	}

	.language {
		width: 92vw;
		height: 96rpx;
		margin-left: 4vw;
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #333333;
		line-height: 96rpx;
		position: relative;
		border-bottom: 1px solid #E0E0E0;
	}

	.language image {
		width: 26rpx;
		height: 16rpx;
		position: absolute;
		top: 40rpx;
		right: 0rpx;
	}
</style>
